package com.material.common.base;

import com.material.common.core.domain.entity.SysUser;
import com.material.common.exception.ServiceException;

public class CommonController {

    public void checkSupplierUser(SysUser sysUser){
        Long bizId = sysUser.getBizId();
        String userType = sysUser.getUserType();
        if(!userType.equals(SysUser.USER_TYPE_3)){
            throw new ServiceException("当前用户无法使用该功能");
        }
        if(bizId == null){
            throw new ServiceException("数据异常，请联系管理员");
        }
    }
}
